package cac.fenjian.resource.itemOutBill.rest;

import cac.fenjian.resource.itemOutBill.service.ItemOutBillService;
import cac.fenjian.resource.outBill.service.WmsInvOutBillService;
import com.cac.dme.adapter.rest.msg.ResponseMsg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("itemOutBill")
public class ItemOutBillRest {
    @Autowired
    private ItemOutBillService itemOutBillService;
    @PostMapping("/updateWmsItemInventory")
    public ResponseMsg<Integer> updateWmsItemInventory(@RequestBody HashMap<String,Object> map){
        ResponseMsg<Integer> responseMsg = new ResponseMsg<>();
        List<Map> maps = (List<Map>) map.get("maps");
        Integer msg = itemOutBillService.updateWmsItemInventory(map);
        responseMsg.setResponseBody(msg);
        return responseMsg;
    }
}
